package com.itheima.controller;

import com.itheima.Log.Log;
import com.itheima.common.R;
import com.itheima.dto.EmpLoginDto;
import com.itheima.dto.EmpUpdateDto;
import com.itheima.service.EmpService;
import com.itheima.vo.EmpLoginVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class EmpLoginController {
    @Autowired
    EmpService empService;

    @PostMapping("/login")
    public R EmpLogin(@RequestBody EmpLoginDto dto) {
        EmpLoginVo emplogin = empService.emplogin(dto);
        return R.ok(emplogin);
    }



}
